from django.db import models


# Create your models here.

class User(models.Model):
    uid = models.IntegerField(primary_key=True, auto_created=True)
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=128)

    class Meta:
        db_table = 'user'


class MusicLog(models.Model):
    mid = models.IntegerField(primary_key=True, auto_created=True)
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    sentence = models.CharField(max_length=256)
    create_time = models.FloatField()

    class Meta:
        db_table = 'music'
